﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using Model.Entity;
using Ones.Dal.Infrastructure;

namespace Ones.Wcf.SystemAdministration
{
    [ServiceContract]
    public interface IServiceAccountManagement
    {
        #region DMM
        
        [OperationContract]
        Boolean createUserAccount(String username, String password, String email, String empId, String role);
        
        [OperationContract]
        Boolean modifyAccount(Employee modifiedEmp);
        
        [OperationContract]
        Boolean createRole(String roleName);
        
        [OperationContract]
        Boolean lockUser(Object userId);
        
        [OperationContract]
        Boolean unlockUser(Object userId);
        
        [OperationContract]
        Boolean updateAccountDetails(String empId, String userId, String username, String fname, String lname, Boolean isMale, String email, String role, Boolean isApproved);
        
        [OperationContract]
        Boolean changePassword(String userId, String oldPwd, String newPwd);
        
        [OperationContract]
        String resetPassword(String userId);
        
        #endregion
        
        #region DQM
        
        [OperationContract]
        List<Employee> getEmployees();
        
        [OperationContract]
        List<ViewMembershipUserEmployee> getEmployeesHaveAccount();
        
        [OperationContract]
        List<Employee> getEmployeesNoAccount();
        
        [OperationContract]
        List<ViewMembershipUserEmployee> searchEmpHaveAcc(String searchBy, String key);
        
        [OperationContract]
        List<Employee> searchEmpNoAcc(String searchBy, String key);
        
        [OperationContract]
        ViewMembershipUserEmployee getAccountDetails(Object userId);
        
        [OperationContract]
        Employee getEmployeeById(String empId);
        
        [OperationContract]
        List<aspnet_Role> getRoles();
    
        #endregion
    }
}